/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package swa.e_store.entity;

import javax.persistence.*;

/**
 * This class represents the table 'offer' of the 'SWArchitecture' database.
 * 
 * @author Stefan
 */
@Entity
@Table (name = "offer")
@NamedQueries({
    @NamedQuery(name = "offer.findAll", query = "SELECT o FROM Offer o")
})
public class Offer {
    
    @Id
    @Column (name = "id")
    private int id;
    
    @Column (name = "description")
    private String description;
        
    //Variables comparing to the attributes of the table
    

    
    
    /**
     * Empty standard-constructor. Needed by JPA for bean interaction!
     */
    public Offer(){
        
    }
    
    /**
     * Constructor for standard initialization.
     */
    public Offer(int id, String description){
        
        this.id = id;
        this.description = description;

        
    }
    
    //Getter & Setter

    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    // toString override
    
    @Override
    public String toString(){
        return "offer[id: " + id + ", description: " + description +"]\n";
    }
}
